package com.huaxin.hxenum.validation;

import com.huaxin.hxenum.validator.UnitValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = UnitValidator.class)
public @interface ValidUnit {
    String message() default "无效的计量单位，允许值：none/v/a/w/kw/kwh/va/var/dbm/ms/s/min/hour/day/month/year/c/f/lux/percent/ppm/rpm/m/m2/m3";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}